﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MyOA.DAL;
using MyOA.Model;

namespace MyOA.BLL
{
  public  class AddNoteManage
    {
      AddNoteService service = new AddNoteService();

      /// <summary>
      /// 根据便签ID找相对应的便签
      /// </summary>
      /// <param name="noteId">便签ID</param>
      /// <returns>返回一个便签ID</returns>
      public MyNote getMyNoteByNoteId(int noteId)
      {
          return service.getMyNoteByNoteId(noteId);
      }

      /// <summary>
       /// 根据登陆号来查找登陆用户ID
       /// </summary>
       /// <param name="loginId">登陆号</param>
       /// <returns>登陆用户ID</returns>
      public int getUserIdByLoginId(string loginId)
      {
          return service.getUserIdByLoginId(loginId);
      }

       /// <summary>
       /// 增加便签
       /// </summary>
       /// <param name="note">要增加的便签信息</param>
       /// <returns>返回是否增加成功</returns>
      public int insertMyNote(MyNote note)
      {
          return service.insertMyNote(note);
      }

        /// <summary>
       /// 根据便签ID删除便签信息
       /// </summary>
       /// <param name="noteId">便签ID</param>
       /// <returns>返回是否删除成功</returns>
      public int deleteMyNoteByNoteId(int noteId)
      {
          return service.deleteMyNoteByNoteId(noteId);
      }

       /// <summary>
       /// 根据便签ID来修改便签信息
       /// </summary>
      /// <param name=""note">便签信息</param>
       /// <returns>是否修改成功</returns>
      public int UpdateMyNoteByNoteId(MyNote note)
      {
          return service.UpdateMyNoteByNoteId(note);
      }
    }
}
